<template>
  <div id="app">
    <!-- 顶部导航 -->
    <div id="nav">
      <router-link to="/home">Home</router-link> 
      <router-link to="/demo1">Demo1</router-link>
      <router-link to="/demo2">Demo2</router-link>
      <router-link to="/demo3">Demo3</router-link>
      <router-link to="/demo4">Demo4</router-link>
      <router-link to="/demo5">Demo5</router-link>
    </div>
    <!-- 路由占位 -->
    <router-view/>
  </div>
</template>

<style lang="less">
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
#nav {
  display: flex;
  justify-content: space-evenly;
  a {
    height: 90px;
    line-height: 90px;
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    &:hover{
      color: #66a287;
      // transform: scale(1.05); // 缩放动画
    }
    &.router-link-exact-active {
      color: #42b983;
    }
    &.router-link-active{
      color: #42b983;
      border-bottom: 3px solid #42b983;
    }
  }
}
</style>
